<script type="text/javascript" src="<?php echo base_url(); ?>media/jquery/jquery.min.js"></script>
<div id="empleados">
    
      <div class="control-group">
        <label class="control-label" for="codCir">Fecha Registro:</label>
        <div class="controls">
            <?php latisoft_datePicker('fecReg', '', $format='dd-mm-yyyy', '', $active=false, $size='4')?>            
      </div>
      </div>
    
      <div class="control-group">
        <label class="control-label" for="codCir">Fecha Opereración:</label>
        <div class="controls">
            <?php latisoft_datePicker('fecOpe', '', $format='dd-mm-yyyy', date('d-m-Y'), $active=true, $size='4') ?> 
            
        </div>
      </div>
    <?php
        function comboBoxHoras($id, $label){
            $dp = array();

            for ($i=0; $i<24; $i++){
                $dp[] = array(
                        'value' => $i,
                        'label' => substr("00".$i, -2).":00"
                    );
            }

            latisoft_comboBox($id, $label, $dp, -1, "una hora", true);
        }

        //latisoft_comboBox("cbTurnos", "Turno", array(), -1, "un turno", true);
        comboBoxHoras('cbDesde', 'Desde');
        comboBoxHoras('cbHasta', 'Hasta');
    ?>
    <div class="control-group">
        <label class="control-label" for="cama">Quirofano </label>
        <div class="controls">
                 <input type="text" readonly="readonly" class="input-small" id="cama" name="cama">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <a href="#myModal" role="button" class="btn btn-mini btn-success" data-toggle="modal" onclick="limpiarDatosModal()"><strong>Buscar</strong></a>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="cama">Ambiente Hospitalización </label>
        <div class="controls">
                 <input type="text" readonly="readonly" class="input-small" id="hospcam" name="hospcam">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <a href="#myAmHops" role="button" class="btn btn-mini btn-success" data-toggle="modal" onclick="limpiarDatosModal2()"><strong>Buscar</strong></a>
        </div>
    </div>
    <input type="hidden" name="agregados" id="agregad" value="">
      <div class="control-group">
        <label class="control-label" for="codCir">Cirujano Principal</label>
        <div class="controls">
            <input type="text" name="emplead[]" id="codCir" readonly='readonly' placeholder="Codigo">
            <input type="text" id='nomCiru'  disabled='disabled' placeholder="Nombre">
            <button class="btn btn-mini  btn btn-success" type="button" onclick="buscarEmple('codCir','nomCiru','cod','name')">Buscar</button>
        </div>
      </div>
        
      <div class="control-group">
        <label class="control-label" for="codAna">Anestesista Principal</label>
        <div class="controls">
            <input type="text" name="emplead[]" id="codAna" readonly='readonly'  placeholder="Codigo">
            <input type="text" id='nomAna'  disabled='disabled' placeholder="Nombre">
            <button class="btn btn-mini  btn btn-success" type="button" onclick="buscarEmple('codAna','nomAna','cod','name')">Buscar</button>
        </div>
      </div>
    
      <div class="control-group">
        <label class="control-label" for="codEnf">Enf. Instrumentadora</label>
        <div class="controls">
            <input type="text" name="emplead[]" id="codEnf" readonly='readonly'  placeholder="Codigo">
            <input type="text" id='nomEnf'  disabled='disabled' placeholder="Nombre">
            <button class="btn btn-mini  btn btn-success" type="button" onclick="buscarEmple('codEnf','nomEnf','cod','name')">Buscar</button>
        </div>
      </div>
</div>
<button class="btn btn-mini  btn btn-success" type="button" onclick="crearDiv('empleados')">Agregar Fila</button>

<!--            <td>
                <?php
//                    $unaopcion=array('value'=>'1','label'=>'1');
//                     $option=array($unaopcion);
//                    latisoft_comboBox('quiro','', $option, "", 'Quirofano', true, $size='70', $inForm=true)
                ?>
            </td>
            <td>
                <?php
//                    $unaopcion=array('value'=>'1','label'=>'1');
//                     $option=array($unaopcion);
//                    latisoft_comboBox('turno','', $option, "", 'Turno', true, $size='70', $inForm=true)
                ?>
            </td>-->
<!--            <td>
                <select multiple='multiple' data-placeholder='Seleccione Equpo' id='equi' name='equi' class='chzn-select' style='width:150px'>
                    <option value='1'>Electro Cardiograma</option>
                    <option value='2'>Ultrasonido</option>
                    <option value='3'>Aspirador Quirúrgico</option>
                    <option value='4'>ElectroCirugía</option>
                    <option value='5'>Aspirador de succión</option>
                </select>
            </td>-->

<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;width:700px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">Seleccionar Quirofano</h3>
            </div>
            <div class="modal-body" style="height:550px;">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group"></div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2">
                    </div>
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label"><strong>Ambiente</strong></label>
                            <div class="controls">
                                <?php  
                                    $js = ' id=ambiente1 class ="input-large chzn-select" onchange="ambiente(\'ambiente1\',\'sitio1\')"';
                                    echo form_dropdown('ambiente1', $comboAmbiente, NULL, $js); 
                                ?>
                            </div>
                        </div>
                        <div class="control-group" id="sitio1">                            
                        </div>
                        <div class="control-group" id="sitio2">
                            
                        </div>                        
                    </div>
                    <div class="span4">
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group"></div>
                    </div>
                    <div class="span8">
                        <a class="btn btn-primary center" onclick="asignarQuiro()" data-dismiss="modal" aria-hidden="true"> Asignar Quirofano</a>
                    </div>
                </div>
            </div>
        </div>


 <div class="modal" id="myAmHops" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;width:700px;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">Seleccionar Cama</h3>
            </div>
            <div class="modal-body" style="height:550px;">
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group"></div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span2">
                    </div>
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label"><strong>Ambiente</strong></label>
                            <div class="controls">
                                <?php  
                                    $js = ' id=ambieHosp1 class ="input-large chzn-select" onchange="comboAnidadoHosp1()""';
                                    echo form_dropdown('ambieHosp1', $comboHosp, NULL, $js); 
                                ?>
                            </div>
                        </div>
                        <div class="control-group" id="sitioHosp1">
                            
                        </div>
                        <div class="control-group" id="sitioHosp2">
                            
                        </div>
                    </div>
                    <div class="span4">
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">
                        <div class="control-group"></div>
                    </div>
                    <div class="span8">
                        <a class="btn btn-primary center" onclick="asignarBed()" data-dismiss="modal" aria-hidden="true"> Asignar Cama</a>
                    </div>
                </div>
            </div>
        </div>